/*
 * Copyright (c) 2018. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
 * Morbi non lorem porttitor neque feugiat blandit. Ut vitae ipsum eget quam lacinia accumsan.
 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 * /**
 * thymeleaf模板引擎控制器
 */

package com.aphaca.rs.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.HashMap;

@Controller
@RequestMapping("/user")
public class ThymeleafController {

    @RequestMapping("/login/")
    public String login(HashMap<String,Object> map){
        map.put("status","1");
        map.put("error","1");
        map.put("msg","SSSSSS");
        return "/login";
    }

    @RequestMapping(value = { "/index/", "/" })
    public String index(HashMap<String,Object> map){
        map.put("user",System.getenv().get("USERNAME"));
        return "/index";
    }
}
